package com.lgy.utils.enums;

public enum EsIndexEnum {
    ES_STUDY("feng", "直播看板搜索"),
    ES_STUDY_BAC("feng_t", "备份");

    private String key;
    private String name;

    private EsIndexEnum(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public String getKey() {
        return this.key;
    }

    public String getName() {
        return this.name;
    }

    public static String getEsIndex(String key) {
        for(EsIndexEnum esIndexEnum : EsIndexEnum.values()) {
            if(esIndexEnum.getKey().equals(key)) {
                return key;
            }
        }
        return null;
    }
}
